program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  pelement = ^element;
  element = record
    value : Integer;
    next : pelement;
  end;

var
  fin : textfile;
  n, i, f, j, d, a : integer;
  head, head2, head3, current : pelement;

procedure AddToBegin (var head : pelement; num : integer);
var tmp : pelement;
begin
  tmp := head;
  New (head);
  head^.value := num;
  head^.next := tmp;
end;

procedure AddToEnd (var head : pelement; num : integer);
var current : pelement;
begin
  if (head<>nil) then
  begin
    current := head;
    while(current^.next<>nil) do
    begin
      current:=current^.next;
    end;
    new(current^.next);
    current^.next^.value:=num;
    current^.next^.next:=nil;
  end else begin
    AddToBegin(head, num);
  end;
end;

procedure PrintList (head : pelement);
var current : pelement;
begin
  current:=head;
  while(current<>nil) do
  begin
    writeln(current^.value);
    current:=current^.next;
  end;
end;


function Delete (var head : pelement):integer;
var tmp : pelement;
begin
  if (head <> nil) then
  begin
    tmp := head^.next;
    Delete := head^.value;
    Dispose (head);
    head := tmp;
  end;
end;

begin
  assignfile(fin, 'input.txt');
  reset(fin);

  readln(fin, n);
  for i:=0 to n-1 do
  begin
   read(fin, a);
   AddToBegin(head, a);
  end;

  if (n mod 2 =0) then
  begin
    f:=n div 2;
    d:=f;
  end;
  if (n mod 2 <> 0) then
  begin
    f:=(n-1) div 2;
    d:=(n+1) div 2;
  end;

  for i := 0 to (f-1) do
  begin
    AddToEnd(head2, head^.value);
    if (head^.next<>nil) then
      head:=head^.next;
  end;

  for i := (d-1) to n-1 do
  begin
    if(head<>nil) then
    begin
      AddToBegin(head3, head^.value);
      if(head^.next<>nil) then
      begin
        head:=head^.next;
      end else begin
        break;
      end;
    end;
  end;

  current := head3;

  for i:=d-1 to n-1 do
  begin
    if (head3<>nil) then
    begin

      AddToBegin(head2, current^.value);
      if (current^.next<>nil) then
      begin
        current:=current^.Next;
      end else begin
        break;
      end;
    end;
  end;

  PrintList(head2);

  for j:=0 to n-1 do
  begin
    Delete(head);
    Delete(head2);
  end;

  closefile(fin);
  readln;
end.
